package com.angel.application.assembler;

import com.angel.application.dto.AngelUserInfoDTO;
import com.angel.domain.angeluser.aggregates.AngelUser;

/*
 * 更新关注微信公众号： 为了offer
 * @author parkin
 * @description 将用户聚合转为DTO
 * @date 2021/11/13
 */
public class AngelUserAssembler {

    public static final AngelUserInfoDTO toAngelUserInfoDTO(AngelUser angelUser) {
       return new AngelUserInfoDTO(
               angelUser.getAngelUserId().getId(),
               angelUser.getAngelUserInfo().getUserBasicInfo().getNickName(),
               angelUser.getAngelUserInfo().getUserBasicInfo().getHeadImage().getHeadImage(),
               angelUser.getAngelUserLevel().getNowUserLevel().getAngelLevelName(),
               angelUser.getAngelUserLevel().getNowExperienceValue()
       );
    }

}
